.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: hidden;
  transition: background-color 0.3s ease-out;

  &.active {
    background-color: rgba(0, 0, 0, 0.45);
  }

  .cloud {
    position: absolute;
    font-size: 80px;
    opacity: 0;
    animation: float 8s infinite ease-in-out;
    z-index: -1;
    transition: opacity 0.5s ease;
    color: white;

    &.cloud-1 { top: 20%; left: 10%; animation-delay: 0s; }
    &.cloud-2 { top: 60%; right: 15%; animation-delay: 1s; }
    &.cloud-3 { bottom: 10%; left: 25%; animation-delay: 2s; }
  }

  &.active .cloud {
    opacity: 0.1;
  }

  .dialog-content {
    width: 500px;
    max-width: 90vw;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transform: translateY(40px) scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);

    &.bounce-in {
      transform: translateY(0) scale(1);
      opacity: 1;
    }

    .dialog-header {
      padding: 15px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: var(--bs-theme-color);
      color: white;

      .dialog-title h2 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
      }

      .title-underline {
        height: 2px;
        width: 40px;
        background: white;
        border-radius: 1px;
        margin-top: 6px;
      }

      .close-btn {
        width: 32px;
        height: 32px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;

        &:hover {
          background: rgba(255, 255, 255, 0.3);
        }
      }
    }

    .dialog-body {
      padding: 15px;

      .form-group {
        margin-bottom: 12px;

        label {
          display: flex;
          align-items: center;
          font-size: 13px;
          color: #606266;
          margin-bottom: 6px;

          .iconfont {
            margin-right: 6px;
            font-size: 14px;
          }
        }

        .form-input {
          width: 100%;
          padding: 10px;
          border: 1px solid #dcdfe6;
          border-radius: 4px;
          font-size: 13px;
          transition: all 0.3s;
          background: white;

          &:focus {
            outline: none;
            border-color: var(--bs-theme-color);
            box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
          }
        }
      }

      .form-row {
        display: flex;
        gap: 12px;

        .form-group {
          flex: 1;
        }
      }

      .radio-group {
        display: flex;
        gap: 10px;
        margin-top: 5px;
        
        .radio-item {
          padding: 8px 15px;
          border: 1px solid #dcdfe6;
          border-radius: 4px;
          background-color: #fff;
          color: #606266;
          font-size: 13px;
          cursor: pointer;
          display: flex;
          align-items: center;
          gap: 6px;
          transition: all 0.2s;
          
          &:hover {
            background-color: #f5f7fa;
          }
          
          &.active {
            background-color: var(--bs-theme-color);
            color: white;
            border-color: var(--bs-theme-color);
          }
        }
      }
    }

    .dialog-footer {
      padding: 12px 15px;
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      background: #f5f7fa;
      border-top: 1px solid #dcdfe6;

      .btn {
        padding: 8px 16px;
        border-radius: 4px;
        border: 1px solid #dcdfe6;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: all 0.2s;

        &.cancel-btn {
          background: white;
          color: #606266;

          &:hover {
            background: #f2f6fc;
            transform: translateY(-1px);
          }
        }

        &.submit-btn {
          background: var(--bs-theme-color);
          color: white;
          border-color: var(--bs-theme-color);

          &:hover:not(:disabled) {
            background: #66b1ff;
            transform: translateY(-1px);
          }
          
          &:disabled {
            opacity: 0.6;
            cursor: not-allowed;
          }
        }
      }
    }
  }

  .decoration {
    position: absolute;
    font-size: 18px;
    animation: float 6s infinite ease-in-out;
    z-index: -1;
    color: var(--bs-theme-color);
    opacity: 0;

    &.star-1 { top: 15%; right: 15%; animation-delay: 0.5s; }
    &.star-2 { top: 70%; left: 15%; animation-delay: 1s; }
    &.star-3 { bottom: 15%; right: 20%; animation-delay: 1.5s; }
  }

  &.active .decoration {
    opacity: 0.1;
  }
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0) translateX(0) rotate(0deg); 
  }
  25% { 
    transform: translateY(-15px) translateX(5px) rotate(2deg); 
  }
  50% { 
    transform: translateY(0) translateX(10px) rotate(0deg); 
  }
  75% { 
    transform: translateY(-10px) translateX(-5px) rotate(-2deg); 
  }
}

@media (max-width: 600px) {
  .dialog-content {
    width: 90vw;

    .dialog-header {
      padding: 12px;

      .dialog-title h2 {
        font-size: 16px;
      }
    }

    .dialog-body {
      .form-row {
        flex-direction: column;
        gap: 12px;
      }
    }

    .dialog-footer .btn {
      padding: 6px 12px;
      font-size: 12px;
    }
  }
}